<%@page import="java.io.* , java.util.*, java.sql.*,  com.myapp.struts.dao.*, com.myapp.struts.beans.*"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Schedule Creation</title>
        <link href="../../../../css/cms.css" rel="stylesheet" type="text/css">
        <script language="javascript" type="text/javascript">
            function Validate()
            {
                var index1=document.scheduleform.schedulename.selectedIndex;
                if(index1<=0)
                {
                    alert("Please Select Schedle Name....");
                    document.scheduleform.schedulename.focus();
                    return false;
                }
                var index2=document.scheduleform.schno.selectedIndex;
                if(index2<=0)
                {
                    alert("Please Select Schedle Level....");
                    document.scheduleform.schno.focus();
                    return false;
                }
            }
        </script>
</head>
<body bgcolor="#D3F1D5">
<table width="63%" border="0" align="center" cellpadding="0" cellspacing="0" style="border-right: #000000 1px solid;
                               border-top: #000000 1px solid; border-left: #000000 1px solid;  border-bottom: #000000 1px solid; font-size: 9pt; color: #000000; font-family: Arial;">
  <tr>
    <th height="24" colspan="3" scope="col">List of Schedules</th>
  </tr>
  <tr>
    <th height="22" scope="col">Schedule Name</th>
    <th scope="col">Sub Schedule 1</th>
    <th scope="col">Sub Schedule2</th>
  </tr>
  <%
            ScheduleDao shd = new ScheduleDao();

            ArrayList al = shd.list();
            if (al != null) {
                Iterator itg = al.iterator();
                while (itg.hasNext() == true) {
                    ScheduleBean shb = (ScheduleBean) itg.next();
                    String Schedule_Name = shb.getSchedule_Name();
                    String SubSchedule1 = shb.getSub_Schedule1();
                    String SubSchedule2 = shb.getSub_Schedule2();
                        %>
  <tr>
    <td align="center"><%=Schedule_Name%></td>
    <td align="center"><%=SubSchedule1%></td>
    <td align="center"><%=SubSchedule2%></td>
  </tr>
  <%}
                                     }%>
</table>
</body>
</html>
